//
//  TempViewController.swift
//  01sinablog
//
//  Created by ZhangZiang on 15/12/23.
//  Copyright © 2015年 ZhangZiang. All rights reserved.
//

import UIKit

class TempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        setupUI()
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    private func setupUI() {
        view.backgroundColor = UIColor.whiteColor()
        
        title = "\(navigationController?.childViewControllers.count ?? 0) 个控制器"
        
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "PUSH", style: .Plain, target: self, action: "pushVC")
    }

    @objc private func pushVC() {
        let vc = TempViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
